Optimal. Leaf size=351 \[ \frac {(b c-a d) \cos (e+f x) \sqrt {c+d \sin (e+f x)}}{\left (a^2-b^2\right ) f (a+b \sin (e+f x))}+\frac {(b c-a d) E\left (\frac {1}{2} \left (e-\frac {\pi }{2}+f x\right )|\frac {2 d}{c+d}\right ) \sqrt {c+d \sin (e+f x)}}{b \left (a^2-b^2\right ) f \sqrt {\frac {c+d \sin (e+f x)}{c+d}}}+\frac {\left (2 a b c d+a^2 d^2-b^2 \left (c^2+2 d^2\right )\right ) F\left (\frac {1}{2} \left (e-\frac {\pi }{2}+f x\right )|\frac {2 d}{c+d}\right ) \sqrt {\frac {c+d \sin (e+f x)}{c+d}}}{b^2 \left (a^2-b^2\right ) f \sqrt {c+d \sin (e+f x)}}+\frac {(b c-a d) \left (2 a b c+a^2 d-3 b^2 d\right ) \Pi \left (\frac {2 b}{a+b};\frac {1}{2} \left (e-\frac {\pi }{2}+f x\right )|\frac {2 d}{c+d}\right ) \sqrt {\frac {c+d \sin (e+f x)}{c+d}}}{(a-b) b^2 (a+b)^2 f \sqrt {c+d \sin (e+f x)}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.67, antiderivative size = 351, normalized size of antiderivative = 1.00, number of steps
used = 9, number of rules used = 9, integrand size = 27, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {2878, 3138,
2734, 2732, 3081, 2742, 2740, 2886, 2884} \begin {gather*} \frac {\left (a^2 d^2+2 a b c d-\left (b^2 \left (c^2+2 d^2\right )\right )\right ) \sqrt {\frac {c+d \sin (e+f x)}{c+d}} F\left (\frac {1}{2} \left (e+f x-\frac {\pi }{2}\right )|\frac {2 d}{c+d}\right )}{b^2 f \left (a^2-b^2\right ) \sqrt {c+d \sin (e+f x)}}+\frac {(b c-a d) \cos (e+f x) \sqrt {c+d \sin (e+f x)}}{f \left (a^2-b^2\right ) (a+b \sin (e+f x))}+\frac {(b c-a d) \sqrt {c+d \sin (e+f x)} E\left (\frac {1}{2} \left (e+f x-\frac {\pi }{2}\right )|\frac {2 d}{c+d}\right )}{b f \left (a^2-b^2\right ) \sqrt {\frac {c+d \sin (e+f x)}{c+d}}}+\frac {(b c-a d) \left (a^2 d+2 a b c-3 b^2 d\right ) \sqrt {\frac {c+d \sin (e+f x)}{c+d}} \Pi \left (\frac {2 b}{a+b};\frac {1}{2} \left (e+f x-\frac {\pi }{2}\right )|\frac {2 d}{c+d}\right )}{b^2 f (a-b) (a+b)^2 \sqrt {c+d \sin (e+f x)}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2732
Rule 2734
Rule 2740
Rule 2742
Rule 2878
Rule 2884
Rule 2886
Rule 3081
Rule 3138
Rubi steps
\begin {align*} \int \frac {(c+d \sin (e+f x))^{3/2}}{(a+b \sin (e+f x))^2} \, dx &=\frac {(b c-a d) \cos (e+f x) \sqrt {c+d \sin (e+f x)}}{\left (a^2-b^2\right ) f (a+b \sin (e+f x))}+\frac {\int \frac {\frac {1}{2} \left (3 b c d-a \left (2 c^2+d^2\right )\right )-d (a c-b d) \sin (e+f x)-\frac {1}{2} d (b c-a d) \sin ^2(e+f x)}{(a+b \sin (e+f x)) \sqrt {c+d \sin (e+f x)}} \, dx}{-a^2+b^2}\\ &=\frac {(b c-a d) \cos (e+f x) \sqrt {c+d \sin (e+f x)}}{\left (a^2-b^2\right ) f (a+b \sin (e+f x))}+\frac {\int \frac {\frac {1}{2} d \left (a^2 c d-3 b^2 c d+a b \left (c^2+d^2\right )\right )+\frac {1}{2} d \left (2 a b c d+a^2 d^2-b^2 \left (c^2+2 d^2\right )\right ) \sin (e+f x)}{(a+b \sin (e+f x)) \sqrt {c+d \sin (e+f x)}} \, dx}{b \left (a^2-b^2\right ) d}+\frac {(b c-a d) \int \sqrt {c+d \sin (e+f x)} \, dx}{2 b \left (a^2-b^2\right )}\\ &=\frac {(b c-a d) \cos (e+f x) \sqrt {c+d \sin (e+f x)}}{\left (a^2-b^2\right ) f (a+b \sin (e+f x))}+\frac {\left ((b c-a d) \left (2 a b c+a^2 d-3 b^2 d\right )\right ) \int \frac {1}{(a+b \sin (e+f x)) \sqrt {c+d \sin (e+f x)}} \, dx}{2 b^2 \left (a^2-b^2\right )}+\frac {\left (2 a b c d+a^2 d^2-b^2 \left (c^2+2 d^2\right )\right ) \int \frac {1}{\sqrt {c+d \sin (e+f x)}} \, dx}{2 b^2 \left (a^2-b^2\right )}+\frac {\left ((b c-a d) \sqrt {c+d \sin (e+f x)}\right ) \int \sqrt {\frac {c}{c+d}+\frac {d \sin (e+f x)}{c+d}} \, dx}{2 b \left (a^2-b^2\right ) \sqrt {\frac {c+d \sin (e+f x)}{c+d}}}\\ &=\frac {(b c-a d) \cos (e+f x) \sqrt {c+d \sin (e+f x)}}{\left (a^2-b^2\right ) f (a+b \sin (e+f x))}+\frac {(b c-a d) E\left (\frac {1}{2} \left (e-\frac {\pi }{2}+f x\right )|\frac {2 d}{c+d}\right ) \sqrt {c+d \sin (e+f x)}}{b \left (a^2-b^2\right ) f \sqrt {\frac {c+d \sin (e+f x)}{c+d}}}+\frac {\left ((b c-a d) \left (2 a b c+a^2 d-3 b^2 d\right ) \sqrt {\frac {c+d \sin (e+f x)}{c+d}}\right ) \int \frac {1}{(a+b \sin (e+f x)) \sqrt {\frac {c}{c+d}+\frac {d \sin (e+f x)}{c+d}}} \, dx}{2 b^2 \left (a^2-b^2\right ) \sqrt {c+d \sin (e+f x)}}+\frac {\left (\left (2 a b c d+a^2 d^2-b^2 \left (c^2+2 d^2\right )\right ) \sqrt {\frac {c+d \sin (e+f x)}{c+d}}\right ) \int \frac {1}{\sqrt {\frac {c}{c+d}+\frac {d \sin (e+f x)}{c+d}}} \, dx}{2 b^2 \left (a^2-b^2\right ) \sqrt {c+d \sin (e+f x)}}\\ &=\frac {(b c-a d) \cos (e+f x) \sqrt {c+d \sin (e+f x)}}{\left (a^2-b^2\right ) f (a+b \sin (e+f x))}+\frac {(b c-a d) E\left (\frac {1}{2} \left (e-\frac {\pi }{2}+f x\right )|\frac {2 d}{c+d}\right ) \sqrt {c+d \sin (e+f x)}}{b \left (a^2-b^2\right ) f \sqrt {\frac {c+d \sin (e+f x)}{c+d}}}+\frac {\left (2 a b c d+a^2 d^2-b^2 \left (c^2+2 d^2\right )\right ) F\left (\frac {1}{2} \left (e-\frac {\pi }{2}+f x\right )|\frac {2 d}{c+d}\right ) \sqrt {\frac {c+d \sin (e+f x)}{c+d}}}{b^2 \left (a^2-b^2\right ) f \sqrt {c+d \sin (e+f x)}}+\frac {(b c-a d) \left (2 a b c+a^2 d-3 b^2 d\right ) \Pi \left (\frac {2 b}{a+b};\frac {1}{2} \left (e-\frac {\pi }{2}+f x\right )|\frac {2 d}{c+d}\right ) \sqrt {\frac {c+d \sin (e+f x)}{c+d}}}{(a-b) b^2 (a+b)^2 f \sqrt {c+d \sin (e+f x)}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains complex when optimal does not.
time = 26.92, size = 891, normalized size = 2.54 \begin {gather*} \frac {(b c \cos (e+f x)-a d \cos (e+f x)) \sqrt {c+d \sin (e+f x)}}{\left (a^2-b^2\right ) f (a+b \sin (e+f x))}+\frac {-\frac {2 \left (4 a c^2-5 b c d+a d^2\right ) \Pi \left (\frac {2 b}{a+b};\frac {1}{2} \left (-e+\frac {\pi }{2}-f x\right )|\frac {2 d}{c+d}\right ) \sqrt {\frac {c+d \sin (e+f x)}{c+d}}}{(a+b) \sqrt {c+d \sin (e+f x)}}-\frac {2 i \left (4 a c d-4 b d^2\right ) \cos (e+f x) \left ((b c-a d) F\left (i \sinh ^{-1}\left (\sqrt {-\frac {1}{c+d}} \sqrt {c+d \sin (e+f x)}\right )|\frac {c+d}{c-d}\right )+a d \Pi \left (\frac {b (c+d)}{b c-a d};i \sinh ^{-1}\left (\sqrt {-\frac {1}{c+d}} \sqrt {c+d \sin (e+f x)}\right )|\frac {c+d}{c-d}\right )\right ) \sqrt {\frac {d-d \sin (e+f x)}{c+d}} \sqrt {-\frac {d+d \sin (e+f x)}{c-d}} (-b c+a d+b (c+d \sin (e+f x)))}{b d^2 \sqrt {-\frac {1}{c+d}} (b c-a d) (a+b \sin (e+f x)) \sqrt {1-\sin ^2(e+f x)} \sqrt {-\frac {c^2-d^2-2 c (c+d \sin (e+f x))+(c+d \sin (e+f x))^2}{d^2}}}-\frac {2 i \left (-b c d+a d^2\right ) \cos (e+f x) \cos (2 (e+f x)) \left (2 b (c-d) (b c-a d) E\left (i \sinh ^{-1}\left (\sqrt {-\frac {1}{c+d}} \sqrt {c+d \sin (e+f x)}\right )|\frac {c+d}{c-d}\right )+d \left (-2 (a+b) (-b c+a d) F\left (i \sinh ^{-1}\left (\sqrt {-\frac {1}{c+d}} \sqrt {c+d \sin (e+f x)}\right )|\frac {c+d}{c-d}\right )+\left (2 a^2-b^2\right ) d \Pi \left (\frac {b (c+d)}{b c-a d};i \sinh ^{-1}\left (\sqrt {-\frac {1}{c+d}} \sqrt {c+d \sin (e+f x)}\right )|\frac {c+d}{c-d}\right )\right )\right ) \sqrt {\frac {d-d \sin (e+f x)}{c+d}} \sqrt {-\frac {d+d \sin (e+f x)}{c-d}} (-b c+a d+b (c+d \sin (e+f x)))}{b^2 d \sqrt {-\frac {1}{c+d}} (b c-a d) (a+b \sin (e+f x)) \sqrt {1-\sin ^2(e+f x)} \left (-2 c^2+d^2+4 c (c+d \sin (e+f x))-2 (c+d \sin (e+f x))^2\right ) \sqrt {-\frac {c^2-d^2-2 c (c+d \sin (e+f x))+(c+d \sin (e+f x))^2}{d^2}}}}{4 (a-b) (a+b) f} \end {gather*}
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(1026\) vs.
\(2(439)=878\).
time = 25.03, size = 1027, normalized size = 2.93
method | result | size |
default | \(\frac {\sqrt {-\left (-d \sin \left (f x +e \right )-c \right ) \left (\cos ^{2}\left (f x +e \right )\right )}\, \left (\frac {2 d^{2} \left (\frac {c}{d}-1\right ) \sqrt {\frac {c +d \sin \left (f x +e \right )}{c -d}}\, \sqrt {\frac {d \left (1-\sin \left (f x +e \right )\right )}{c +d}}\, \sqrt {\frac {\left (-\sin \left (f x +e \right )-1\right ) d}{c -d}}\, \EllipticF \left (\sqrt {\frac {c +d \sin \left (f x +e \right )}{c -d}}, \sqrt {\frac {c -d}{c +d}}\right )}{b^{2} \sqrt {-\left (-d \sin \left (f x +e \right )-c \right ) \left (\cos ^{2}\left (f x +e \right )\right )}}+\frac {\left (a^{2} d^{2}-2 a b c d +b^{2} c^{2}\right ) \left (-\frac {b^{2} \sqrt {-\left (-d \sin \left (f x +e \right )-c \right ) \left (\cos ^{2}\left (f x +e \right )\right )}}{\left (a^{3} d -a^{2} b c -a \,b^{2} d +b^{3} c \right ) \left (a +b \sin \left (f x +e \right )\right )}-\frac {a d \left (\frac {c}{d}-1\right ) \sqrt {\frac {c +d \sin \left (f x +e \right )}{c -d}}\, \sqrt {\frac {d \left (1-\sin \left (f x +e \right )\right )}{c +d}}\, \sqrt {\frac {\left (-\sin \left (f x +e \right )-1\right ) d}{c -d}}\, \EllipticF \left (\sqrt {\frac {c +d \sin \left (f x +e \right )}{c -d}}, \sqrt {\frac {c -d}{c +d}}\right )}{\left (a^{3} d -a^{2} b c -a \,b^{2} d +b^{3} c \right ) \sqrt {-\left (-d \sin \left (f x +e \right )-c \right ) \left (\cos ^{2}\left (f x +e \right )\right )}}-\frac {b d \left (\frac {c}{d}-1\right ) \sqrt {\frac {c +d \sin \left (f x +e \right )}{c -d}}\, \sqrt {\frac {d \left (1-\sin \left (f x +e \right )\right )}{c +d}}\, \sqrt {\frac {\left (-\sin \left (f x +e \right )-1\right ) d}{c -d}}\, \left (\left (-\frac {c}{d}-1\right ) \EllipticE \left (\sqrt {\frac {c +d \sin \left (f x +e \right )}{c -d}}, \sqrt {\frac {c -d}{c +d}}\right )+\EllipticF \left (\sqrt {\frac {c +d \sin \left (f x +e \right )}{c -d}}, \sqrt {\frac {c -d}{c +d}}\right )\right )}{\left (a^{3} d -a^{2} b c -a \,b^{2} d +b^{3} c \right ) \sqrt {-\left (-d \sin \left (f x +e \right )-c \right ) \left (\cos ^{2}\left (f x +e \right )\right )}}+\frac {\left (3 a^{2} d -2 a b c -b^{2} d \right ) \left (\frac {c}{d}-1\right ) \sqrt {\frac {c +d \sin \left (f x +e \right )}{c -d}}\, \sqrt {\frac {d \left (1-\sin \left (f x +e \right )\right )}{c +d}}\, \sqrt {\frac {\left (-\sin \left (f x +e \right )-1\right ) d}{c -d}}\, \EllipticPi \left (\sqrt {\frac {c +d \sin \left (f x +e \right )}{c -d}}, \frac {-\frac {c}{d}+1}{-\frac {c}{d}+\frac {a}{b}}, \sqrt {\frac {c -d}{c +d}}\right )}{\left (a^{3} d -a^{2} b c -a \,b^{2} d +b^{3} c \right ) b \sqrt {-\left (-d \sin \left (f x +e \right )-c \right ) \left (\cos ^{2}\left (f x +e \right )\right )}\, \left (-\frac {c}{d}+\frac {a}{b}\right )}\right )}{b^{2}}-\frac {4 d \left (a d -b c \right ) \left (\frac {c}{d}-1\right ) \sqrt {\frac {c +d \sin \left (f x +e \right )}{c -d}}\, \sqrt {\frac {d \left (1-\sin \left (f x +e \right )\right )}{c +d}}\, \sqrt {\frac {\left (-\sin \left (f x +e \right )-1\right ) d}{c -d}}\, \EllipticPi \left (\sqrt {\frac {c +d \sin \left (f x +e \right )}{c -d}}, \frac {-\frac {c}{d}+1}{-\frac {c}{d}+\frac {a}{b}}, \sqrt {\frac {c -d}{c +d}}\right )}{b^{3} \sqrt {-\left (-d \sin \left (f x +e \right )-c \right ) \left (\cos ^{2}\left (f x +e \right )\right )}\, \left (-\frac {c}{d}+\frac {a}{b}\right )}\right )}{\cos \left (f x +e \right ) \sqrt {c +d \sin \left (f x +e \right )}\, f}\) | \(1027\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {{\left (c+d\,\sin \left (e+f\,x\right )\right )}^{3/2}}{{\left (a+b\,\sin \left (e+f\,x\right )\right )}^2} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________